﻿@{
    ViewBag.Title = "Update";
    Layout = "~/Views/Shared/_Admin_Layout.cshtml";
    ViewBag.Controller = "seo";
    ViewBag.Cate = "Seo Website";
    ViewBag.Module = "Cập nhật SEO";
}

<script type="text/javascript">
    $(function () {
        $('#_btn_add').live('click', function () {
            UpdateItem("@ViewBag.Controller");
            return false;
        });
    });
</script>

<!--Tabs-->
<div class="tabs">
    <span class="item"><a href="/admin" title="">Bảng điều khiển</a></span>
    <span class="icon-arrow">&gt;</span>
    <span class="item"><a href="/admin/@ViewBag.Controller" title="">@ViewBag.Cate</a></span>
    <span class="icon-arrow">&gt;</span>
    <span class="item">Cập nhật</span>
</div>
<!--End Tabs-->

<!--Container-->
<div class="container">
	<form class="table-content" id="_PostData" method="post">
        <div class="list-btn">
            <a href="/admin/@ViewBag.Controller" class="btn btn-primary" title="Danh sách">Danh sách</a>
            @if (ViewBag.View == null)
            { 
                
            }
            else
            {
                <input type="submit" class="btn btn-warning" id="_btn_add" value="Cập nhật" />
            }
        </div>
        <div class="clearAll"></div>
        <div class="notice"><span class="close-notice icon-remove"></span></div>
		<div class="title"><span class="icon-user"></span>@ViewBag.Module</div>
		<div class="error"></div>
		<div class="box-field">
            <input type="hidden" name="id" id="_id" value="@if (ViewBag.View != null){ @ViewBag.View.id }"/>
            <table class="altrowstable" id="alternatecolor">
                <tr>
                    <th>Tên Field</th><th>Input Field</th>
                </tr>
                <tr>
                    <td>Tiêu đề website</td>
                    <td><input type="text" name="title" id="_title" class="span5" value="@if (ViewBag.View != null){ @ViewBag.View.title }" placeholder="Ex: 4F TEAM"/></td>
                </tr>
                <tr>
                    <td>Từ khóa SEO</td>
                    <td><input type="text" name="keyword" id="_keyword" class="span5" value="@if (ViewBag.View != null){ @ViewBag.View.keyword }" placeholder="Ex: thoi trang, mi pham, trang suc" /></td>
                </tr>
                <tr>
                    <td>Description</td>
                    <td><input type="text" name="description" id="_description" class="span5" value="@if (ViewBag.View != null){ @ViewBag.View.description }" placeholder="Ex: Website hàng đầu về buôn bán" /></td>
                </tr>
                <tr>
                    <td>Google Analytics</td>
                    <td><textarea name="googleid" id="_googleid" class="span7" style="height: 150px" placeholder="Dán code Google Analytics vào đây">@if (ViewBag.View != null){ @ViewBag.View.googleid }</textarea></td>
                </tr>
                <tr>
                    <td>Facebook Box</td>
                    <td><textarea name="facebookid" id="_facebookid" class="span7" style="height: 150px" placeholder="Dán code Facebook Box vào đây">@if (ViewBag.View != null){ @ViewBag.View.facebookid }</textarea></td>
                </tr>
            </table>
		</div>
	</form>         
</div>
<!--End Container-->